﻿package com.dykj.platform.iadapter.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;

public class InputTags extends ComponentTagSupport{
	private String name;
	private String value;
	private String editable;
	private String type = "text";
	private String attr;
	private String model="true";

	public String getAttr() {
		return attr;
	}

	public void setAttr(String attr) {
		this.attr = attr;
	}

	@Override
	public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {
		return new Input(arg0);
	}
	
	//	获得参数  
    protected void populateParams() {  
        super.populateParams();  
        Input input = (Input)component;  
        input.setEditable(editable);
        input.setName(name);
        input.setValue(value);
        input.setType(type);
        input.setAttr(attr);
        input.setModel(model);
    }  
    
	public String getEditable() {
		return editable;
	}
	public void setEditable(String editable) {
		this.editable = editable;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
}
